package com.ruoyi.business.service.impl;

import java.util.List;

import com.ruoyi.business.domain.*;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.business.mapper.BusContractReminderMapper;
import com.ruoyi.business.service.IBusContractReminderService;

/**
 * 合同催款Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-09-02
 */
@Service
public class BusContractReminderServiceImpl implements IBusContractReminderService 
{
    @Autowired
    private BusContractReminderMapper busContractReminderMapper;

    /**
     * 查询合同催款
     * 
     * @param reminderId 合同催款主键
     * @return 合同催款
     */
    @Override
    public BusContractReminder selectBusContractReminderByReminderId(Long reminderId)
    {
        return busContractReminderMapper.selectBusContractReminderByReminderId(reminderId);
    }

    /**
     * 查询合同催款列表
     * 
     * @param busContractReminder 合同催款
     * @return 合同催款
     */
    @Override
    public List<BusContractReminder> selectBusContractReminderList(BusContractReminder busContractReminder)
    {
        return busContractReminderMapper.selectBusContractReminderList(busContractReminder);
    }

    /**
     * 新增合同催款
     * 
     * @param busContractReminder 合同催款
     * @return 结果
     */
    @Override
    public int insertBusContractReminder(BusContractReminder busContractReminder)
    {
        busContractReminder.setCreateTime(DateUtils.getNowDate());
        return busContractReminderMapper.insertBusContractReminder(busContractReminder);
    }

    /**
     * 修改合同催款
     * 
     * @param busContractReminder 合同催款
     * @return 结果
     */
    @Override
    public int updateBusContractReminder(BusContractReminder busContractReminder)
    {
        busContractReminder.setUpdateTime(DateUtils.getNowDate());
        return busContractReminderMapper.updateBusContractReminder(busContractReminder);
    }

    /**
     * 批量删除合同催款
     * 
     * @param reminderIds 需要删除的合同催款主键
     * @return 结果
     */
    @Override
    public int deleteBusContractReminderByReminderIds(Long[] reminderIds)
    {
        return busContractReminderMapper.deleteBusContractReminderByReminderIds(reminderIds);
    }

    /**
     * 删除合同催款信息
     * 
     * @param reminderId 合同催款主键
     * @return 结果
     */
    @Override
    public int deleteBusContractReminderByReminderId(Long reminderId)
    {
        return busContractReminderMapper.deleteBusContractReminderByReminderId(reminderId);
    }

    /**
     * 获取合同催款列表信息
     * @return
     */
    @Override
    public List<BusContractReminderDetail>  getContractReminderList(BusContractReminderParam busContractReminderParam){
        return busContractReminderMapper.getContractReminderList(busContractReminderParam);
    }
}
